package com.adong.config;


import com.adong.pojo.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author adong
 */
//使用@PropertySource读取外部配置文件中的K/V保存到运行的环境变量中;加载完成外部配置文件以后用${}取出配置文件的值
@PropertySource(value = {"classpath:/value.properties"})
@Configuration
public class PropertiesValueConfig {
    @Bean
    public User user() {
        return new User();
    }
}
